<!DOCTYPE html>
<html>

<head>
    {include file='public/meta'/}
    <style>
        thead tr th {
            text-align: center;
        }

        tbody tr td {
            text-align: center;
        }
    </style>
</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgr15 mgl15">
            <ul class="breadcrumb">
                <li>
                    当前位置是&nbsp;:&nbsp;系统管理
                </li>
                <li class="active" style="color: #02b87f;"> 代理级别</li>
            </ul>
        </div>
        <div class="panel mgr15 mgl15" style="position: relative;">
            <div class="panel-heading" style="background:#ededed;">
                代理级别
            </div>
            <div class="col-sm-12 text-right mgb10" style="position:absolute;right:20px;top:4px;">
                <button data-toggle="modal" data-target="#myModal" type="button" name="Cashier" method="post" action=""
                        class="btn btn-info">添加代理商级别
                </button>
            </div>
            <div class="panel-body">
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th>代理级别</th>
                        <th>商户数</th>
                        <if condition="(authcheck('System/delagentlevel',session('uid'))) or (authcheck('System/delagentlevel',session('uid')))">
                            <th class="hidden-phone">操作</th>
                        </if>
                    </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>

            </div>
        </div>

        <!-- 添加联系人模态框（Modal） -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel">
                            添加代理商级别
                        </h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal adminex-form" action="" method="post" id="sysuser"
                              enctype="multipart/form-data">
                            <div class="form-group" id="ferror1">
                                <label class="col-sm-3 col-sm-3 control-label">代理商级别:</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control ipt4" id="agentlevel" name="username">
                                    <div id="error1" class="error"></div>
                                </div>
                            </div>
                            <div class="form-group" id="ferror2">
                                <label class="col-sm-3 col-sm-3 control-label">商户数:</label>
                                <div class="col-sm-9">
                                    <input type="text" id="tenantnum" name="number" class="form-control ipt4">
                                    <div id="error2" class="error"></div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer" style="border-top: 0;">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                        <button type="button" class="btn btn-primary" id="tj" onclick="addform()">
                            提交
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel2">
                            代理商级别维护
                        </h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal adminex-form" action="" method="post"
                              enctype="multipart/form-data">
                            <div class="form-group">
                                <label class="col-sm-3 col-sm-3 control-label">代理商级别:</label>
                                <div class="col-sm-9">
                                    <input type="hidden" class="form-control ipt4" id="id" name="id">
                                    <input type="text" class="form-control ipt4" id="agentlevel2" name="username">
                                    <div class="error"></div>
                                </div>
                            </div>
                            <div class="form-group" id="ferror">
                                <label class="col-sm-3 col-sm-3 control-label">商户数:</label>
                                <div class="col-sm-9">
                                    <input type="text" id="tenantnum2" name="number" class="form-control ipt4">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer" style="border-top: 0;">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                        <button type="button" class="btn btn-primary" onclick="xgform()">
                            提交
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        {include file='public/footer'/}

    </div>
</section>
<script>

    function xg(id, name, number) {

        $('#myModal2').modal('show');
        $('#id').val(id);
        $('#agentlevel2').val(name);
        $('#tenantnum2').val(number);

    }

</script>
</body>

</html>